Construction of variable-stepsize multistep formulas