Better thought-out solution

i.imgur.com/MrkIUDQ.gif