made a time function to speed up the time