added parametric 1-d code