solved a deadlock, now working on the asynchronization