applying changes for ngram in join.java