function to load in studies