Changed the logic for displaying the resources