Refactored to optimize code