added comment that histogram approach takes a lot more memory