added two new member function to compare