updated db module to work with seneca