update course project: create p2.R with nessary step.