added logic to show different items on the page