prettyTime function fixed