Added some functions to mining crystal, but still working on this