histogram searching complete