changed local database structure to allow for database caching (from online database)