add tempaltes support