throughout the code replaced  for rfield_sample_start and rfield_date_end for . Additionally changed the field_time and field_time_end to field_sample_start and field_sample_end