energi calculation working (no weights!)