finished theoretical portion of question 3.