moved update to db class