Working version... incredibly slow.