Improved communication with db