It might be a bit clearer if `option` returned the option string that you then append to `output` inline below? Rather than relying on the scoping?