task #1734: refactoring on code.