I thought I assigned the instance variable on line 20? But if it's inefficient, no problem to change to use this function - although beware that if different inputs have different semantics, this may pose a problem if you keep flipping the order - unless we set semantics at input stage, see my comment.