finally the calculation of coordinates and the number in the list works