new version, much faster and is coded in Python and Dart