Tips on encoding scheme