working on scoping