changing fortran routines to cblas interface