Change prototype for isEqual to function