added java sockets for communication