improvements at as_array()