get the requires in the right order