Not as succinct but it works

Not much to see here ;)