fixed an error in the order of function parameters and updated the documentation
updated documentation