compare method 2