final version, more or less. requires jmathplot in the buildpath to run