modified NA handling in ordering