time working correctly, simplified