submitted version, mergesorts still wonky