compile success! still need to change the compare function from member to friend function