fixed key value so that it is the day number instead of day number -1