bar chart done, but need module pattern