use header for creating data array