makes flattened data array method