why the double ifs here that do the same thing?