changed code for .replace and notes for display function