Refine and add dynamic planning