sort of working to index x and y I think