Added encode decode