DFASAT:adding color encoding, adding z[i]