wrote function to store light curves