Slow template implementation.