implements compare user search logic