updated form to group by name