got header working but need to refactor