first draft of param alg