made entropy more robust