removed dead code and parameters
rewrite comment such that I understand it