refactored form to home page with appropriate controller actions