Added verison with embedded template