change how values are passed to compiled template, require a buffer pos if passing buffer