I was lazy, sorry, I found the answer after doing some searching
Looking at the solution, it seems pretty obvious in retrospect