Refactored code without changing semantics….