refactoring
Add ability to search for database if id not cached