Add manhattan distance function