moved out old code
cleaned up ro_pkgs fxn
added missing params for ro_pkgs