prototype of async comparer