improved database proxy