[DM HW3] prob 3-f added
[DM HW3] modified test rsq calc