kanari refactoring