move decoding out of the execute API