refactoring the forms