starting to mess with R code for analysis