Title: All-optical header procesing based on nonlinear gain and index dynamics in semiconductor optical amplifiers