form refactoring