made a new function to display messages