port changes to C