add curve in exercise 2 and perform ex 2