add 1st template to system and some bug fix