part 1 of the eureka rewrite