An integrated approach to energy sustainability