still debugging sortingTime function...