MIT assignment 4, finished with some notes