move decoding split out