code now passes -fpedantic-error