Added ManhattenDistance calculation