parsing time output more flexible and check user output