int type does not have encode method