formatting form data