Fixed: weights should be between 10 - 1000
Fixed: get the thread id from c library through jna