change variable assignment to comparison