Added testdecodingcheck function