minor changes to execution loop in c file