finished initial version of splat.c