changed ifs

used [[]]