Solution for HW1