finalized some of the form handling