corrected version - presented on class 11/3