Renamed variable ORD

changed ORD to index to indicate purpose