add JSdoc after spending 10 minutes reading source code to determine types of poorly-named params