new way to compute the completion of a plan