add some compare base code