refactored using form helper