add test and update template