added cubecode decoding