New algo; unstable for small var