finished up writing the energy collection management function, not tested yet