Changed longs to doubles because thats the way the JNI wants it