better way of getting timestamp