template implementation start