this cut does not work well with findall!
fix case of variable names