Updated to work with Processing v 2.0