Change comparison to assignment to head node.