copying c code over