c implementation version 0.1