more tweaks, added more comments