logs and ifs