Refactor DatabaseContext - added new method