created all the tables, fixed inserting into the database