updated assign_equipment javascript