better scoping of data