lots of updates esp encoding sketch