fix ord implementation