implemented simple histogram example