form refactored