template adding debugging