Hacked together a quick answer