added solve.c