Homework 2 for SOC