initial work on IB port
more work
more work
cleanup