added handleTCPClient() and calling code in main()