Unit distance code