clean up part9 and add comments