changed references. Only global refs here