Tweaked implementation a bit. Can you believe it actually worked the first time???