added csv mode for input array parsing