function to control the traversal through parameter space