fix argument name of function of error message
add commentary