updating examples
updating examples
Refactoring code and comments
adding tests