created function to print longest line