[IMP]planner: improved template and code.