generate tempalate