Fix time notation
refactor complicated debug statement