changed server.java to get the IP automatically