exercise 11, which deals with chomp method and gets method