completely reworked for Processing 2.* and the HAM API