Update peregrine.py