move header parameters preparation functionality to method

prepareHeaderParameters() method impl