three.c now working