array utility function added