create function to store data and create function to display data