Changed ints to long longs and array into pointer of pointers