init template file
add some function