changing if clauses from =='true' to == true (checking for boolean not string)