reduce scope of a variable