added test_vals_rect subroutine