adjusted the database structure