Better encoding of data