added examples usage & refactoring