finish replication basic working flow (but aof format to be fix)