refactored setEquipment method