replaced all static calls from db to cache