refactoring cam