Add some codes relating to use of template array