added histogram and scan