finished get_packages_size implementation