renamed entropy function