handle index with parent