Modified problem # 2 assignment