comparison helper class