Changes made inside the get coordinates algorithm