working to get histogram to count properly