More WIP on the histogram function