exercise 22, added information about new line character