refactor form reset