decode properly