changed chart targeting and reestructured hist.js