added even more functions ti cache_database