merging the layout