Modified to include path index