code refactoring part 2 & introduce examples