manhattan distance function (with test)
removing test