revived db functionality