public boolean loadEquipment(String equipment, int requiredTechLevel)
     { 
//if the spaceship techlevel could not meet with weapon techlevel requirement, can't install
          if(isEquipmentSlotsFull() || requiredTechLevel > techLevel)
               return false;       
          else
          {
               int equipmentSlotIndex = 0;
               if (!isEquipmentSlotsEmpty())                   //if there exists at least one weapon
               {
                    for (int i = 0; i < maxEquipmentSlots; ++i)
                    {
                         if(!theEquipmentSlots[i].isCurrentSlotUsed()){
                              equipmentSlotIndex = i;               //allocate an open weapon slot
                              break;
                         }
                    }                                  
               }
               //load the weapon to the slot
               theEquipmentSlots[equipmentSlotIndex].installEquipment(equipment);
               theEquipmentSlots[equipmentSlotIndex].setIsSlotUsed(true);
               theEquipmentSlots[equipmentSlotIndex].setCurrentSlotIndex(equipmentSlotIndex);
               numberEquipmentSlotsUsed++;    
               numberOfEquipments++;
               return true;
          }
     }