histogram, cleaned up