Version 1.  kinda works but super slow.