modify energy.py to fit with standard