add db functionality and dependencies