added Asserts and Threads