decode headers