changed for work with bag
Added sort with linq