a better solution to the scope problem