add light curve generation code