using Scope and implementing Resolver

- added executable example of the code in readme
- thanks for @darscan and @Groxo for the first feedback