added all thread implementation, data structures for node class are now synchronized, send and receive methods added