make the function available even w/o lapack