updated object compare to use keys