expression with variable substitution working
subfunctions working