add destroy function to free memory
pnorm_btoh uses now the correct flag