First attempt with basic equality checks.