added proper if syntax