replaced count with strlen in other conditions; trimming RRC/RIC ids