changed goal to 2D array, debugging info