100 percent coverage and refactor