if statement modified and some comments added.
Please enter the commit message for your changes. Lines starting