modified db handler