move tool functions to another file
add qr function
initial version for stochastic svd