If statements modified

I altered the structure of if statements according the rules given