added lightcurve.R