modified read/write header and parameter to allow multiple tokens