Conversion to work in C, testing