fixed the outofscope example