redid or logic