changed function from JGD3.prototype to jgd3