Adding open db functionality