not quite done

need to test a lot more, but I think it's coming together.
removed