hw2 cost reg