version 0.4.1, parse template tags a little more accurately