implement NLjoin