fix the return value
add the first encoding example