corrects scoping issue