approximate sort