added several comparing functions