sync up with processing changes in c++ version