working on algo.c