Added some code to compare the lat and lon.