implemented janky merge sort