bounds checking for rowCol