changed output and added functionality to go back a day