some examples for refactor