Calculating run plan stage 1