code completed during class Nov. 13