added templetizeArray