added selection of correct row for reduction. need to tie in.