Use new function to get time