method compare