add encoder for Go