added compare functions