more proper data decoding