major refactoring+added examples.py