made a function that returns a list of component ids after sort