removed unnecessary variables/arguments and added documentation
removed unnecessary variables/arguments and added documentation