sort resources and components