merging method works for ArrayList, however the mergesort is still having some issues