new database structure/store in database functions