bug fixes and energy app added, version 3.1