grr the usual encode decode problems