finished the times function