around halfway in c implementation