Add phase fitting (not currently working)