Fixes #130
Refactored to use a rust implementation instead of the java impl, because the java impl has been unrelible in linux and macos