add form error checking