add template read & initialization