templates implementation - 1