Spoilers: homework answers for HW 1-3