tried to fix db calls. will continue next week