cleaned commented code