added more notes and cleaned up code
fmt