Added function documentation
addressed PR review comments