changed from annonymous int pointers to ints, and also changed from returned array to passes in array