migrating to c files