func comments and tabs vs spaces fixed
doc updated after all previous mods