Changed to allow for scope change