added scipy function support