first draft of dumb pickle encoder