Added template compatibility, a yield-like solution