add code example to description about template mathod