added histogram + fix for overlapping