updated parameters added histogram