added manhatten distance