Refactoring code 3.