cleaned up and annotated