Improving bar chart code

--removed deep-copy fix