Done, about 10 times faster than in Java