Revert "added temp code for sorting prerequisites"

This reverts commit a47298250be0815858e09d435982b2eb4eb54ac4.
Revert "Revert "added temp code for sorting prerequisites""

This reverts commit 492c8302c3cef20bba223f32f26c6f2f9f56be77.
practically no changes made.