replaced ordinal filter with newly stolen code

code that actualy works on all numbers