working prototype, but it's very slow