added energy collection routines and db setup