Remove unnecessary computation
Refactoring