energy decoding partially done (cheating a bit)