refactors c header helpers