finished initial impl, but stack overflowing all over the place