modified histogram scripts