Made changes to calls to DB