changed the database structure