need to fix access to db