getType, sort by priority