separate MC and data analysis code to avoid to much complexity