added compare()