updated encoding a headers