Abadi's implementation