topn as parameter added.