Update replica.py