rearranged controller for forms