restores scope