cuti factored out parsing of inputs for header