changed bit matrix to ints instead of char's