refactored forms implementation