added histogram scaling with slider