changed the type of the coordinates from int to double