add helper routine for array analysis