add equals method to Name object