finish scoping