more analysis code
merge with my lab laptop