Updated lanczos algorithm to self made, from the translate-polaron branch