rough first version of templating is complete