attempt to dry up code for forms