fixed time handling and added comments