attempt to fill a matrix appropriately with data