move the academic mining code here