Resolves #2 as suggested by @camswords @brigand