added code which corrects for redshift