adding _when_ statements to the parser