update travis
reduce code complexity from socket