added top k sample

GitHub issue #2