updated references and added example notebook

* improved statistics computation inside the main loop