Finish C version