refactoring set_current_pack