modified CoonectionThread.java