modification and refactoring code.