refactor the form builder