distance calculations with manhattan