Modified document to include the function of problem num 1