final commit for june 5th requirements

obviously needs a bit of testing and debugging (this was only done in a
few days), but it seems complete.