merge seems to work, there are some errors in valgrind tho and weird
behavior with size n of array gets large