create global js bag model