make timestamp logic clearer