Update gfas function to use haversine