get threats sorted by code