simple id-lookup
add support for nested scopes