cleaned up three.c