quick implementation of lanczos done