added rudimentary plan-smoothing