this is just a general comment here: I think it would have been easier to read with isEqual