Added planner logic