Playing around with jvm equivalents of some C code from morpheus