It was a blast from the past this week on The Flash, as Barry acted on an insane plan to travel back in time in order to save the future.

The episode opens with Barry frustrated with his inability to compete with Zoom, as he struggles to unlock the secrets of increasing his speed despite a mountain of research. At dinner, Wally inadvertently supplies Barry with the answer — he has to go back in time and convince the evil Harrison Wells (aka Eobard Thawne, aka Reverse Flash) to teach him how to increase his speed.

The Earth 2 Dr. Wells warns Barry that his plan won’t work and that Thawne will recognize his trickery, thereby permanently damaging the timeline. Nevertheless, Barry ropes Caitlin and Cisco into helping him and sets off on a race back to season one.

Barry arrives in the midst of “The Sound and the Fury,” the 11th episode of The Flash‘s first season, featuring Dr. Well’s former protege, Hartley Rathaway (guest star Andy Mientus), aka Pied Piper (who coincidentally got a big shout out on last night’s crossover episode of Supergirl). Barry interrupts his former self in the midst of taking down Rathaway, and (after an extended battle) injects himself with the tranquilizer Caitlin cooked up. After a quick switch of chest emblems, Barry finishes off Rathaway and returns to S.T.A.R. Labs.

Why 'The Flash' Needs a 'Rebirth' in Season 4

It’s not long before Barry seizes the moment and asks Dr. Wells for help in increasing his speed. Wells is immediately suspicious of Barry’s motivations and is further alarmed when Barry presents him with some advanced equations regarding the speed force.

Their session is interrupted, though, when a surprisingly frightening supernatural creature appears in Barry’s lab at CCPD headquarters and generally scares the hell out of everyone before disappearing. It turns out it’s a creature called a “Time Wraith” — mysterious beings who haunt time travelling speedsters and try to prevent them from altering the timeline. Harry Potter Dementor jokes aside, it’s actually the most Doctor Who thing to ever appear in the Arrowverse, and that includes actors John Barrowman, Alex Kingston, and Arthur Darvill.