implementing repositories and models for db interaction
fix deleted cache