cleanup and added time override functionality