minor note:
on casual inspection you could use `unless` instead of negating both sides. or `!=` instead of `!expr == expr`