reworking on templates