remove dead code
Fix time computation and retrieval