Allow script to handle more than 2 of the same energy
Tested - working