commented and cleaned