add testcase and modify code
major restructuring
major refactoring and performance boosts
avoid deadlocks ;)