added simple encoding example