changed B and k to lat and lng