updates to write form data to DB