Added observer2.scala from p121