Removed unnecessary variable
Optimized code