adding routine for computing 1d Laplacian