change to db::update and corresponding tests