- update front-end
- improve insertTempl function