first version
Templates implementation