changed updating of global db, so that it only updates, doesn't create new global db