removed threading stuff, as it is not important to rsa and seems not to work on cpp