Modified total packages code and added some echo