Lloyd's implementation finished