distance now working fully