add implementation of remaining_packages()