Changed if structure