yeah, could you maybe come up with a good stretch of pseudo code so we can figure out what's really going on? I get what you're trying to do, but for what purpose? What do these integers represent, are they becoming part of this array? If so is it random? Why are you making pairs? How are you arriving at n when you have (x,y)?