ready to fix compare logic
this commit is incomplete