work on replication part of chapter 2