What's the format of this?  I can't tell from the docstring.  Says it returns the answer, but code uses inputs.  Says it provides a map -- does it return a map, or merely allow the mapping to be done externally?  If the latter, don't use "provides".