Db update() function modified