Refactored code with fixed spelling.