added two new pointer overloaded compare function