merging and moving code in different files