Not familiar enough with python yet, but added a Java version!