implemented generateSucc method