add code for complex case of using variables in blanks