quickly removed duplivate histogram method