updated code to work with Processing v2.0.3