better parsing of form data