minimal C version