Write cluster version of hw3q1.