more tweaking and adding comments