http://scratch.mit.edu/projects/17439145/ Ported to Java