some cout printings deleted