A working merge function I want to implment it all in one though