adding order index
fixing ordering