replace scripts with a C program