Added comments to p1.scala