updated to fix db access issue