modift: correct entropy function