fixed sortingTime function; 0, 1, and -1 not needed, just values.