refactor Reset button
cleaned up code