knc: Implement mining