Added random energies operation