finished test_vals_rect function