add: encode and decode function comments.