Resolves #4 as suggested by @archangel-irk