making time parsing more modular
modifying for testing