Added outerTpl

Added outerTpl for performance reasons.