added partial template support