refactor form to haml