remove debug code
fixed generateSig method