switched prettify_time() to DRY