replaced Table with 2d-array