added helper for running task planner imperatively