changed responsibility for db creation to new class and change routes for it