updated code in DBAccess