implemented a nice clean top-down mergesort