Removed unnecessary if condition. Clarified comments