Please note that these algorithms block the main thread and there might be a bit of lag when running.