Added Comperator and manhattan dist