promises in template adding