prepared plan generation