updates to wrap template engine