This code is in C