correctly order by integer