screen5 converted Ethan's JavaScript code to Dart code