Updated to work with Processing 2