encode decode trick