Added method to compute manhattan distsance