removed an unnecessary condition/added comments