fixed the order method and index definitino