added a check to make sure timestamp received is in seconds