added abstract method compare