Updated implementation.