refactoring, update examples