better scoping