Added compare functions.