Tried to think of last minute changes but could not debug properly