how to replace multiple attributes?