added a function in get time