Added more helper functions to mine data.