refactoring cannon