Changed indexs from i,j to x,y. My mind is still in Imperitive Land.