re-organize C stuff here