initial code commit; not in particularly good shape.  do not use.