commenting and cleaning code