added time functionality