this code corrects redshift