connect and player changed to work with javafx/fxml