PPW - midterm and assignment 2