changes sim to use 2d array

uydrhgfkhgfkjgh