replace [] with array()