refactor dbProxy