better push this before I mess something up...

made good progress, then decided I don't like the layout of the code,
too messy, so pushing this update before the rewrite