has the code, trying to convert to JavaFX compatible code