Added template functionality