refactoring, add coverage example