fully working, with new bar graph