Moved finding the requested packages to its own method