Made one generic function to show all types of data