analyses.R - fixed few things