elgamal DS test added + some bugs and fixes