initial prototype.  doesn't quite work yet, but the bones are in place.