refactoring + cancel form working