WIP extract method from compare!

Change-Id: I9d79d1c5e7f1e8961f5aff1477d5e1f4900bbffc