some notes
start of encode