bugs fixed; python and c versions match; ready for first real test