refactoring int