Code Refactored - Task 4 is now complete