use template tech instead of specifying the buffer size