replace old template with the new one