I think I've done this right, but I'm unable to get guard to work, so I can't test it - buyer beware