Lanczos rewrite (unfinished)