added variable preprocessing to make config easier (see #25, but also causes #26)