separate subfunctions to detect and plot. Detection is not good yet, because it doesn't pass parameters
make separate notebook for testing synchronicity, it needs to be developed
much smaller main, we keep only the interesting info, with many plots