added square root computation modulo n and more