fix docstring and remove commented code