minors
check for null
simplify sync
encoding
encoding