Merge from Prof. Rich's Code