some refactor and new examples