added time function