use min_row and max_row constants throughout the code. Same for columns.