M4 Homework for CS 2340