Added set time function