commenting and code cleaning