fix reset button with jquery
cleaned up code, but not passing key