tested my sort time function