turned some ifs into #if #endifs