fixed thread bug. server can now process multiple clients concurrently