included replication code. Takes care of single crash