refactor forms