added an IClock interface for mocking