put tcp server a separate class