code refactoring & introduce some examples