Create function about compare