First draft of analisys script
First working script

To rememner what was working for me