reads and displays the data correctly