Created separate helper methods for time parse and close of mongo