updated links, added variables for number of rows, columns