Add predecessor function