commented and cleaned a bit