changed displayData function