move discount function from Main.hs to TimeMachine.hs