moved selecting of topk to different script