replacing some elements