Changed to use time