merging properly