moved lapack stuff to global scope