renamed variables and cleaned up mergesort example