fixed problem with declaring 2d array