time() has to be passed in via the constructor