made code run in Processing on a copy-paste... some sketches may still have small bugs