added second function to display data