allow template to be specified in options