final version
c implementation
c implementation
c implementation