Planning for teaching