add some compare code