got the merge code working