refactor, add example