fixed equation. added entropy